/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Lily
 * Date: 2024-09-23
 * Time: 12:27
 */
public class modify_String {
    public static String modifyString(String s) {
        char[] chars = s.toCharArray();
        int n = chars.length;
        for (int i = 0; i < n; i++) {
            if (chars[i] == '?') {
                for (char c = 'a'; c <= 'z'; c++) {
                    if ((i == 0 || c != chars[i - 1]) && (i == n - 1 || c != chars[i + 1])) {
                        chars[i] = c;
                        break;
                    }
                }
            }
        }
        return String.valueOf(chars);
    }

    public static void main(String[] args) {
        System.out.println(modifyString("??yw?ipkj?"));
    }
}
